package com.lejin.cms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lejin.cms.mapper.ContentMapper;
import com.lejin.cms.service.IContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lejin.cms.entity.Content;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author luminghua
 * @since 2022-04-19
 */
@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> implements IContentService {

    @Override
    public List<Content> findContentListByTpid(String tpId) {

        QueryWrapper<Content> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("content_category_id",tpId);

        return this.baseMapper.selectList(queryWrapper);
    }
}
